﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AttendanceStatistics.aspx.cs"
    Inherits="Meeting.Web.Admin.MeetingAfter.AttendanceStatistics" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>签到统计</title>
    <link rel="stylesheet" type="text/css" href="../../Scripts/themes/cupertino/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="../../Css/main.css" />
    <script src="../../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../Scripts/locale/easyui-lang-zh_CN.js"></script>
    <!--ardialog-->
    <script type="text/javascript" src="../../Scripts/artDialog4.1.6/artDialog.js?skin=blue"></script>
    <script type="text/javascript" src="../../Scripts/artDialog4.1.6/plugins/iframeTools.js"></script>
    <script type="text/javascript" src="../../Scripts/common.js"></script>
    <script type="text/javascript">

        $(function () {
            if (request("psnID") == "") window.location = defaultUrl;
            //初始化列表
            $('#mainList').datagrid({
                url: 'AttendanceStatisticsOperation.ashx?method=GetMeetingAttendance',
                singleSelect: true,
                pagination: true, //是否开启分页
                pageNumber: 1, //默认索引页
                pageSize: 20, //默认一页数据条数
                collapsible: false
            });
            //设置分页
            var p = $("#mainList").datagrid("getPager");
            $(p).pagination({
                pageSize: 20, //每页显示的记录条数，默认为10   
                pageList: [10, 20, 30], //可以设置每页记录条数的列表   
                beforePageText: '第', //页数文本框前显示的汉字   
                afterPageText: '页    共 {pages} 页',
                displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录'
            });
        });
        //
        function DoSearch() {
            $('#mainList').datagrid('reload', {
                Name: $("#fName").val(),
                Begin: $("#txtBeginTime").val(),
                End: $("#txtEndTime").val()
            });
        }
    </script>
    <style type="text/css">
        input
        {
            height: 18px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table class="SearchTable">
        <tr>
            <td>
                名称:
            </td>
            <td>
                <input id="fName" style="width: 120px;" class="easyui-validatebox" />
            </td>
            <td>
                开始时间:
            </td>
            <td>
                <input id="txtBeginTime" onfocus="WdatePicker({startDate:'%y-%M-01 00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"
                    style="width: 120px" />
            </td>
            <td>
                ~
            </td>
            <td>
                <input id="txtEndTime" onfocus="WdatePicker({startDate:'%y-%M-01 00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"
                    style="width: 120px" />
            </td>
            <td>
                <a href="#" class="easyui-linkbutton" onclick="DoSearch();">查询</a>
            </td>
        </tr>
    </table>
    <div style="min-height: 500px; text-align: left;">
        <table id="mainList" class="easyui-datagrid" style="width: 1120px;">
            <thead>
                <tr>
                    <th data-options="field:'Id',width:120,hidden:true">
                    </th>
                    <th data-options="field:'CategoryId',width:120,hidden:true">
                    </th>
                    <th data-options="field:'Name',width:120">
                        会议名称
                    </th>
                    <th data-options="field:'RoomName',width:120 ">
                        会议室
                    </th>
                    <th data-options="field:'StartDate',width:120 ">
                        开始时间
                    </th>
                    <th data-options="field:'EndDate',width:120">
                        预计结束时间
                    </th>
                    <th data-options="field:'HostName',width:120 ">
                        会议主持
                    </th>
                    <th data-options="field:'EmpCount',width:60  ">
                        应到人数
                    </th>
                    <th data-options="field:'FactCount',width:60 ">
                        实到人数
                    </th>
                    <th data-options="field:'actionColumn',width:120,formatter:formatDetail">
                        详细
                    </th>
                    <th data-options="field:'actionColumn1',width:120,formatter:formatAbsent">
                        缺席
                    </th>
                </tr>
            </thead>
        </table>
        <script type="text/javascript">

            function OpenEdit(inUrl, param, width, height, title) {
                var wName;
                var radStr = Math.random();
                var url = inUrl + '?Radstr=' + radStr + param;
                art.dialog.open(url, { title: title,
                    id: 'AAAj', width: width, height: height, lock: true,
                    close: function () {
                        //                        var id = art.dialog.data('id'); // 读取人员选择返回值
                        //                        var name = art.dialog.data('name');
                        //                        $("#HostId").val(id);
                        //                        $("#Host").val(name);
                    }
                }, false);
            }

            function formatDetail(val, row) {
                return "<a href='#' class='easyui-linkbutton' onclick=\"ShowDetail('" + row.Id + "');\"  >详细</a> ";
            }
            function ShowDetail(Id) {
                OpenEdit("AttendanceDetail.aspx", "&IsAbsent=all&Id=" + Id, 530, 400, "参会人员");
            }
            function formatAbsent(val, row) {
                return "<a href='#' class='easyui-linkbutton' onclick=\"ShowAbsent('" + row.Id + "');\"  >缺席情况</a> ";
            }
            function ShowAbsent(Id) {
                OpenEdit("AttendanceDetail.aspx", "&IsAbsent=true&Id=" + Id, 530, 400, "缺席情况");
            }
            function formaFileUp(val, row) {
                return "<img src='../../Images/upload.gif' alt='' /> ";
            }
        </script>
    </div>
    </form>
</body>
</html>
